import request from '@/utils/request.js'

export function addBike(Bike) {
    return request({
        url: '/api/bikes',
        method: 'post',
        data: Bike,
    })
    
}

export function putBike(Bike) {
    return request({
        url: '/api/bikes',
        method: 'put',
        data: Bike
    })

}

export function getBikeById(id) {
    return request({
        url: '/api/bikes/' + id,
        method: 'get'
    });
}

export function getBikeList(pagenum, pagesize, bikeNumber, Status) {
    return request({
        url: '/api/bikes',
        method: 'get',
        params: {
            pageNum: pagenum,
            pageSize: pagesize,
            bikenumber: bikeNumber,
            status: Status
        }
    })
}

export function deleBikeById(id) {
    return request({
        url: '/api/bikes/' + id,
        method: 'delete'
    })
}